package cn.ryh.designpatterndemo.templatemethodpattern;

/**
 * @ClassName BaoMa
 * @Description 宝马
 * @Author RaoYH
 * @Date 2019/4/22
 */
public class BMW extends CarTemplateMethod {
    /**
     * 客户是否开启额外功能
     */
    private boolean alarmFalg = true;

    @Override
    protected void doSomething() {
        System.out.println("BMW系列汽车额外功能");
    }

    @Override
    protected void doAnything() {
        System.out.println("BMW系列汽车默认功能");
    }

    @Override
    protected boolean isAlarm() {
        return alarmFalg;
    }

    public void setAlarmFalg(boolean alarmFalg) {
        this.alarmFalg = alarmFalg;
    }
}
